import request from '@/utils/request'
import type { loginForm, loginResponseData } from './type'
enum API {
  //登录接口
  LOGIN_URL = '/user/v1/login',
  // USERINFO_URL = '/user/info',
  //注册接口
  REGISTER_URL = '/user/v1/register',
}
//登录
export const reqLogin = (data: loginForm) =>
  request.post<any, loginResponseData>(API.LOGIN_URL, data)
export const register = (data: loginForm) =>
  request.post<any, any>(API.REGISTER_URL, data)
//获取用户信息
// export const reqUserInfo = () =>request.get<any, userInfoResponseData>(API.USERINFO_URL)
// export const reqRegister=()=>{
//   request.post(API.REGISTER_URL)
// }
